import cv2
import time

def calculate_fps(start_time, frame_count):
    """计算帧率"""
    elapsed_time = time.time() - start_time
    fps = frame_count / elapsed_time if elapsed_time > 0 else 0
    return fps
